<template>
	<view>
		<view class="add" @click="addbox = true">
			<image class="img" src="@/static/img/add-icon.png" mode="widthFix"></image>
		</view>

		<view class="item" v-for="(item, index) in 3" :key="item">
			<view class="top fcs">
				<view class="l">
					辽宁沈阳市铁西区
				</view>
				<view class="r">
					¥9.00
				</view>
			</view>
			<view class="botom">
				<u-button shape="circle" :custom-style="submitStyle">修改</u-button>
				<u-button shape="circle" :custom-style="editStyle">删除</u-button>
			</view>
		</view>

		<u-popup v-model="addbox" mode="bottom">
			<view class="input-box">
				<view class="title">
					<view class="l" style="opacity: 0;">
						<u-icon name="close" color="#333333" size="28"></u-icon>
					</view>
					<view class="c">
						添加运费
					</view>
					<view class="r" @click="addbox = false">
						<u-icon name="close" color="#333333" size="28"></u-icon>
					</view>
				</view>
				<view class="input">
					<u-form-item label="区" labelWidth="120" right-icon="arrow-right">
						<u-input v-model="value" />
					</u-form-item>
					<u-form-item label="价格" labelWidth="120" right-icon="rmb">
						<u-input v-model="value" />
					</u-form-item>
				</view>
				<view class="btns">
					<u-button shape="circle" :custom-style="popsubStyle" @click="addbox = false">完成</u-button>
					<u-button shape="circle" :custom-style="popcanStyle" @click="addbox = false">取消</u-button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				addbox: false,
				popcanStyle: {
					color: '#F3060D',
					// background: '#F3060D',
					borderColor: '#F3060D',
					width: '334rpx',
					height: '88rpx'
				},
				popsubStyle: {
					color: '#FFF',
					background: '#F3060D',
					width: '334rpx',
					height: '88rpx'
				},
				submitStyle: {
					color: '#FFF',
					background: '#F3060D',
					width: '167rpx',
					height: '64rpx',
					margin: '0',
				},
				editStyle: {
					color: '#666666',
					background: '#F5F5F5',
					width: '167rpx',
					height: '64rpx',
					borderColor: '#F5F5F5',
					margin: '0',
					marginLeft: '30rpx'
				}
			};
		}
	}
</script>

<style lang="scss" scoped>
	
	.input-box {
		height: 573rpx;
		padding: 0 31rpx;
		.btns {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 118rpx;
		}
		::v-deep .u-form-item {
			border-top: 1rpx solid #f2f3f6;
		}
		.title {
			height: 100rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.c {
				font-weight: 500;
				font-size: 30rpx;
				color: #333333;
			}
		}
	}
	.add {
		display: flex;
		align-items: center;
		justify-content: flex-end;

		.img {
			width: 60rpx;
			margin-bottom: 20rpx;
		}
	}

	.item {
		padding: 0 27rpx;
		background-color: #FFF;
		border-radius: 10rpx;
		margin-bottom: 20rpx;

		.botom {
			padding: 31rpx 0;
			display: flex;
			align-items: center;
			justify-content: flex-end;
		}

		.top {
			padding: 24rpx 0;
			border-bottom: 1rpx dashed #E6E6E6;

			.l {
				display: flex;
				align-items: center;
			}
		}
	}

	.fcs {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>
<style>
	page {
		background-color: #F4F5F7;
		padding: 20rpx;
		box-sizing: border-box;
	}
</style>